package com.example.function.sys.model.one;


import lombok.Data;
import org.springframework.context.annotation.Lazy;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Description: <SysUser vo>. <br>
 * 系统帐号
 * generate time:2021-7-20 15:02:07
 *
 * @author hanqf
 * @version V1.0
 */
@Data
@Entity
@Table(name = "tbl_sys_user", schema = "csms_db")
@Lazy(value = true)
public class SysUser implements Serializable {
    private static final long serialVersionUID = 1L;

    /*
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "sys_user_id")
    private Long id;


    /*
     * 登录帐号，供应商邮箱
     */
    @Column(name = "sys_user_login_name")
    private String userLoginName;


    /*
     * 密码
     */
    @Column(name = "sys_user_login_password")
    private String userLoginPassword;


    /*
     * 姓名，供应商全称
     */
    @Column(name = "sys_user_name")
    private String userName;


    /*
     * 联系方式，供应商手机号
     */
    @Column(name = "sys_user_phone")
    private String userPhone;


    /*
     * 部门id
     */
    @Column(name = "sys_user_depart_id_fk")
    private Long userDepartId;


    /*
     * 岗位id
     */
    @Column(name = "sys_user_post_id_fk")
    private Long userPostId;


    /*
     * 用户类型：0-后台用户，1-供应商用户
     */
    @Column(name = "sys_user_type")
    private Integer userType;


    /*
     * 状态：0-禁用，1-启用
     */
    @Column(name = "sys_user_status")
    private Integer userStatus;


    /*
     * 创建时间
     */
    @Column(name = "sys_user_createtime")
    private java.util.Date userCreatetime;


    /*
     * 修改时间
     */
    @Column(name = "sys_user_modifytime")
    private java.util.Date userModifytime;


    //@ManyToMany(cascade = {CascadeType.DETACH}, fetch = FetchType.LAZY)
    //@JoinTable(name = "tbl_sys_userrole", joinColumns = {@JoinColumn(name = "usro_userid_fk")}, inverseJoinColumns = {@JoinColumn(name = "usro_roleid_fk")})
    //@OrderBy("id ASC")
    //private Set<SysRole> roles;


}



